package com.ysd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ysd.entity.Category;
import com.ysd.mapper.CategoryMapper;
import com.ysd.service.CategoryService;

@Service
public class CategoryServiceImpl implements CategoryService {

	@Autowired
	CategoryMapper cMapper;
	@Override
	public List<Category> findCategorys(Category category) {
		return cMapper.getCategorys(category);
	}

	@Override
	public int getCount(Category category) {
		return cMapper.getCount(category);
	}

	@Override
	public int deleteCategory(int c_id) {
		return cMapper.delCategory(c_id);
	}

	@Override
	public int insertCategory(Category category) {
		return cMapper.addCategory(category);
	}

	@Override
	public int updateCategory(Category category) {
		return cMapper.xgCategory(category);
	}

	@Override
	public List<Category> findType() {
		// TODO Auto-generated method stub
		return cMapper.getType();
	}

	@Override
	public Category cChong(Category category) {
		// TODO Auto-generated method stub
		return cMapper.chaChong(category);
	}

}
